package com.pig4cloud.pig.djjk.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.pig.djjk.entity.DeviceEntity;
import com.pig4cloud.pig.djjk.mapper.DeviceMapper;
import com.pig4cloud.pig.djjk.service.DeviceService;
import org.springframework.stereotype.Service;

/**
 * 设备信息
 *
 * @author wd
 * @date 2025-06-08 20:17:42
 */
@Service
public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, DeviceEntity> implements DeviceService {

	@Override
	public DeviceEntity getDeviceByCode(String deviceCode) {
		LambdaQueryWrapper<DeviceEntity> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(DeviceEntity::getDeviceCode, deviceCode);
		return baseMapper.selectOne(queryWrapper);
	}
}
